package service.impl;

import entity.BookList;
import service.IOperation;

/**
 * 借阅图书
 */
public class BorrowBookIOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("您现在进行的是“借阅图书”的操作(*^▽^*)");
        System.out.println("请输入图书名称：");
        String bookName = scanner.next();
        if (bookList.contain(bookName)) {
            bookList.borrowed(bookName);
            System.out.println("借阅成功(*^▽^*)");
            return;
        }
        System.out.println("本馆中暂无此书，请过段时间再来看看(*^▽^*)");
    }
}
